package com.zyh.test03.bean;

public class MyDate {
    public int year;
    public int month;
    public int day;

    //    满参构造方法
    public MyDate(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    //    成员方法
    public void showDate() {
        System.out.println("日期：" + year + "年" + month + "月" + day + "日");
    }
//    判断是否是闰年
    public boolean isLeapYear(int year) {
        if (!((year%100!=0&&year%4==0)||(year%100==0&&year%400==0))){
            return false;
        }
        return true;
    }
}
